<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="lib/layui/css/layui.css">
    <!-- load css -->
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="layui/layui.js" media="all">

    <link rel="stylesheet" type="text/css" href="css/login.css" media="all">
    <style type="text/css">

        .layui-form-item {
            margin-left: -20px;
        }

        a:hover {
            text-decoration: underline;
        }

        .layui-submit .submit_btn {
            width: 45%;
            height: 42px;
            border: none;
            font-size: 16px;
            background: #009688;
            color: #f4f4f4;
            cursor: pointer;
        }
        .submit_btn:hover {
            background: #FF5722;
            color: #f8f8f8;
        }

        .larry-login .login_txtbx {
            font-size: 14px;
            height: 26px;
            line-height: 26px;
            padding: 8px 5%;
            width: 90%;
            text-indent: 2em;
            border: none;
            background: #5cbdaa;
            color: white;
        }
    </style>

</head>
<body>
<div class="layui-canvs"></div>
<div class="layui-layout layui-layout-login">
    <i class="layui-icon layui-icon-face-smile" style="font-size: 30px; color: #009688; margin-left: 150px;"></i>
<!--    <img src="lib/rem.jpg" class="layui-nav-img" style="text-align:center">-->
    <div class="layui-form" lay-filter="resetpassform">
        <div class="layui-form-item">
            <div class="layui-pwd-icon larry-login">
                <input type="password" lay-verify="required" name="login_pass" class="login_txtbx"
                       placeholder="请输入原密码"/>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-pwd-icon larry-login">
                <input type="password" lay-verify="required" name="new_pass" class="login_txtbx" placeholder="请输入新密码"/>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-pwd-icon larry-login">
                <input type="password" lay-verify="required|login_item" name="confirm_pass" class="login_txtbx"
                       placeholder="请您确认密码"/>
            </div>
        </div>
        <div class="layui-submit larry-login">
            <div align="center">
                <button type="button" class="submit_btn" id="resetpass" lay-submit="resetpass" lay-filter="resetpass">
                    保存
                </button>
            </div>
        </div>
    </div>
</div>
<script src="lib/layui/layui.all.js"></script>
<script src="js/layuibase.js"></script>
<script type="text/javascript" src="layui/lay/dest/layui.all.js"></script>
<script type="text/javascript" src="js/login.js"></script>
<script type="text/javascript" src="js/jparticle.jquery.js"></script>
<script type="text/javascript">

    $(function () {
        $(".layui-canvs").jParticle({
            background: "#141414",
            color: "#E6E6E6"
        });


    });
</script>
<script type="text/javascript">
    $(function () {
        $(".layui-canvs").jParticle({
            background: "#141414",
            color: "#E6E6E6"
        });


    });
    //点击按钮的事件
    form.on("submit(resetpass)", function (data) {
        //当表单内容验证成功后，执行此方法
        $.ajax({
            url: 'staff/resetpass',
            data: data.field,
            success: function (result) {


                if (!result) {

                    layer.msg('重置密码失败！', {icon: 2, time: 5000});

                } else {
                    top.location.href = 'login.html';
                }
            }

        });

    });


</script>

</body>
</html>